home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CrsrDev.h
-
- By: Rich Kubota
- */
-
- #include <Types.h>
- #include <fixmath.h>
-
- struct AcclPoint {
- Fixed deviceSpeed;
- Fixed cursorSpeed;
- };
-
- typedef struct AcclPoint AcclPoint;
-
- struct AcclTable {
- Fixed accel;
- short numAcclPoints;
- AcclPoint acclPoints[1];
- };
-
- typedef struct AcclTable AcclTable;
- typedef AcclTable *AcclTablePtr;
-
- struct AcclRsrcType {
- UInt32 acclClass;
- short numAcclTables;
- AcclTable acclTable[1];
- };
-
- typedef struct AcclRsrcType AcclRsrcType;
- typedef AcclRsrcType *AcclRsrcPtr, **AcclRsrcHandle;
-
- struct AccelPointRec {
- Fixed devSpeed; // device speed
- Fixed slope;
- Fixed intercept;
- };
-
- typedef struct AccelPointRec AccelPointRec;
- typedef AccelPointRec AccelPointArray[1];
- typedef AccelPointArray *AccelPointArrPtr;
-
- struct MyCursorDevice {
- struct CursorDevice *nextCursorDevice; /* pointer to next record in linked list */
- CursorData *whichCursor; /* pointer to data for target cursor */
- long refCon; /* application-defined */
- long unused; /* reserved for future */
- OSType devID; /* device identifier (from ADB reg 1) */
- Fixed resolution; /* units/inch (orig. from ADB reg 1) */
- UInt8 devClass; /* device class (from ADB reg 1) */
- UInt8 cntButtons; /* number of buttons (from ADB reg 1) */
- UInt8 filler1; /* reserved for future */
- UInt8 buttons; /* state of all buttons */
- UInt8 buttonOp[8]; /* action performed per button */
- unsigned long buttonTicks[8]; /* ticks when button last went up (for debounce) */
- long buttonData[8]; /* data for the button operation */
- unsigned long doubleClickTime; /* device-specific double click speed */
- Fixed acceleration; /* current acceleration */
- AccelPointArrPtr accelPointArrPtr; /* fields used internally to CDM */
- Fixed deltaX;
- Fixed deltaY;
- Fixed errorX;
- Fixed errorY;
- Fixed denom;
- Fixed spread;
- UInt8 newData;
- UInt8 filler2;
- };
- typedef struct MyCursorDevice MyCursorDevice, *MyCursorDevicePtr;
-
-